<template>
	<view>
		<uni-nav-bar :border="false" :fixed="true" :statusBar="true" @clickRight="openMineSetting()" backgroundColor="#EFEFEF">
			<text slot="right" class="iconfont iconshezhi" style="font-size: 48rpx;"></text>
		</uni-nav-bar>
		<view class="flex align-center m-4" @click="openMineData()">
			<image src="/static/default.jpg" style="width: 128rpx;height: 128rpx;" class="rounded-circle"></image>
			<view class="flex flex-column flex-1 px-2 align-start">
				<text class="font font-weight-bold text-dark">戴春花</text>
				<text class="font-sm text-muted">江苏 · 苏州</text>
			</view>
			<text class="iconfont iconxiayibu"></text>
		</view>

		<view class="flex align-center border-radius-background mx-2">
			<uni-list class="text-left mx-2" :border="false">
				<uni-list-item showArrow="true" title="我的钱包" showExtraIcon="true" to="../wallet-main/wallet-main">
					<template slot="header">
						<image class="slot-image" src="@/static/icons/iconwodeqianbao.png"></image>
					</template></uni-list-item>
				<uni-list-item showArrow="true" title="我的订单" showExtraIcon="true">
					<template slot="header">
						<image class="slot-image" src="@/static/icons/iconwodedingdan.png"></image>
					</template></uni-list-item>
				<uni-list-item showArrow="true" title="我赞过的" showExtraIcon="true">
					<template slot="header">
						<image class="slot-image" src="@/static/icons/iconwozanguode.png"></image>
					</template></uni-list-item>
				<uni-list-item showArrow="true" title="我关注的" showExtraIcon="true">
					<template slot="header">
						<image class="slot-image" src="@/static/icons/iconwoguanzhude.png"></image>
					</template></uni-list-item>
				<uni-list-item showArrow="true" title="我的律师" showExtraIcon="true">
					<template slot="header">
						<image class="slot-image" src="@/static/icons/iconzixunlingyu.png"></image>
					</template></uni-list-item>
				<uni-list-item showArrow="true" title="律师认证" showExtraIcon="true" to="../lawyercer/lawyercer">
					<template slot="header">
						<image class="slot-image" src="@/static/icons/iconlvshirenzheng.png"></image>
					</template></uni-list-item>
			</uni-list>
		</view>
	</view>
</template>

<script>
	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
	import store from '@/store/index.js';
	export default {
		components: {
			uniListItem
		},
		data() {
			return {
				setlist: [{
					name: "情感纠纷"
				}, {
					name: "经济合同"
				}, {
					name: "情感纠纷"
				}],
				myData: [{
					name: "执业年限",
					num: 5
				}, {
					name: "帮助人数",
					num: 86
				}, {
					name: "服务时长",
					num: 8622
				}, {
					name: "服务评分",
					num: 4.95
				}]
			}
		},
		onReady() {

		},
		onShow: function() {
			if (!store.state.hasLogin) {
				uni.showToast({
					title: '请先登录',
					icon: 'none'
				});
				// return uni.navigateTo({
				// 	url: '../login/login'
				// });
			}
		},
		methods: {
			// 点击右上角设置
			openMineSetting() {
				uni.navigateTo({
					url: '../usersetings/usersetings'
				});
			},
			openMineData() {
				uni.navigateTo({
					url: '../personal-data/personal-data'
				});
			}
		}
	}
</script>

<style>
	.uni-section__footer {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.uni-section__footer-tag {
		height: 48rpx;
		background-color: #E5E5E5;
		width: 4rpx;
	}

	.slot-image {
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
		margin-right: 32rpx;
		margin-top: 8rpx;
		width: 40rpx;
		height: 40rpx;
	}
</style>
